package com.open.capacity.reimburse.task;

import com.open.capacity.reimburse.config.OCRProperties;
import com.open.capacity.reimburse.service.SysInvoiceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @desc pdf定时识别
 */
@Component
@Slf4j
public class PdfOCRTask implements ScheduledOfTask {

    @Autowired
    private SysInvoiceService invoiceService;

    @Autowired
    private OCRProperties ocrProperties;

    @Override
    public void execute() {
        try {
            log.info("start excute PdfOCRTask");
            invoiceService.startPDF();
        } catch (Throwable e) {
            log.error("execute process has error(Throwable) : ", e);
        }
    }
}
